package ro.ubbcluj.adm.twitter.client;

import twitter4j.Twitter;
import twitter4j.TwitterException;

/**
 * Callback for TwitterConnector. Used due to the asynchronous nature of the
 * authorization mechanism.
 */
public interface TwitterConnectorListener {

	/**
	 * Called when a connection is established.
	 * 
	 * @param twitterConnection
	 *            the established connection
	 */
	void onConnectionSuccessful(Twitter twitterConnection);

	/**
	 * Called when OAuth is aborted by user.
	 */
	void onConnectionAborted();

	/**
	 * Called when a problem appears during OAuth dance. This is triggered due
	 * to problems that didn't involve a user action.
	 * 
	 * @param exception
	 */
	void onException(TwitterException exception);

}
